#ifndef _Ape_FS_OBject_h
#define _Ape_FS_OBject_h

#include <Ape/Object.h>
#include <Ape/IO/FS/Path.h>

#include <sys/stat.h>

struct stat;

namespace Ape {
	namespace IO {
		namespace FS {
		
			enum FileType {
				Regular,
				Directory
			};
			
			class FSObject : public Object {
				TYPE_NAME ("Ape::IO::FS::FSObject")
			protected:
				Path m_Path;
				mutable struct stat m_Stat;
			public:
				FSObject();
				FSObject (const Path& path);
				virtual ~FSObject();
				
				const struct stat& get_Stat() const;
				
				bool get_Exists() const;
				FileType get_FType() const;
				
				virtual void _Dump (bool verbose = false) const;
			};
		}
	}
}

#endif // _Ape_FS_OBject_h
